local weilin = fk.CreateSkill {
  name = "lvshi__weilin",
  tags = {Skill.Limited}
}

Fk:loadTranslationTable{
  ["lvshi__weilin"] = "威临",
  [":lvshi__weilin"] = "限定技，一名角色的回合结束后，若你的手牌数为场上最大，你可增加4点体力上限，回复3点体力，复原“横征”的两项， “横征”描述增加“你失去1点体力”。",

  ["$lvshi__weilin1"] = "今吾入京城，欲寻人而食。",
  ["$lvshi__weilin2"] = "天下事在我，我今为之，谁敢不从？",
}

weilin:addEffect(fk.TurnEnd,{
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(weilin.name) and player:usedSkillTimes(weilin.name, Player.HistoryGame) == 0
    and table.every(player.room:getAlivePlayers(), function (p) return p:getHandcardNum() <= player:getHandcardNum() end)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeMaxHp(player, 4)
    room:recover{who = player, num = 3, recoverBy = player, skillName = weilin.name}
    local all_choices = {}
    for i = 1, 3, 1 do
      if player:getMark("ls__hengzheng"..i) > 0 then
        table.insert(all_choices, "ls__hengzheng"..i)
      end
    end
    if #all_choices > 0 then
      local choices = room:askToChoices(player, {
        choices = all_choices,
        min_num = 1,
        max_num = 2,
        skill_name = weilin.name})
      for _, choice in ipairs(choices) do
        room:setPlayerMark(player, choice, 0)
      end
    end
    room:addPlayerMark(player, "hengzhengedit")
  end,
})



return weilin